<h1 class="right">ادارة سندات القبض</h1><!--<div class="h1-dot"></div><a href="#add_client" class="add_furnitures_pop">
  <img src="images/add-icon.png" align="left" class="left" alt=""/>
</a> -->
<div id="add_client" class="zoom-anim-dialog mfp-hide view-booking-popup">
	<?php require("recipt_vouchers/create.php"); ?>
</div>
<span class="left grey medium margin-left11 margin-top5"><?php echo date('g:ia d/m/Y');?></span>
<div class="clear"></div>
<div id="dashboard-container">
<div class="customers-filter">
    	<form  name="reciept_search" id="searchClient" method="POST" action="">
      <table class="furnitures-filter">
        <tr>
              
                <td style="width:18px;">من</td>
                <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input" id="from" name="from" value="<?php if(isset($binds['from']) ) {echo $binds['from'];} ?>"></td>
                <td style="width:25px;">الى</td>
                <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input"  id="to" name="to" value="<?php if(isset($binds['to']) ) {echo $binds['to'];} ?>"></td>
                <td style="width:105px;">رقم العقد / الحجز</td>
                <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input" name="contract_id" value="<?php if(isset($binds['contract_id']) ) {echo $binds['contract_id'];} ?>"></td>
                <td style="width:62px;">رقم السند</td>
                <td style="width:70px; padding-left:20px;"><input type="text" class="xsmall-input" name="recipet_id" value="<?php if(isset($binds['recipet_id']) ) {echo $binds['recipet_id'];} ?>"></td>
                <input type="hidden" id="page" name="page" value="" />
                <td style="width:50px"><div class="search-botton">بحث</div></td>
              
        </tr>
      </table>
      </form>
    </div>
	<div class="dashboard-row">
    
    	<table class="customers-table">
        	<tr class="customers-table-head">
            	<td widthf="160px">رقم السند</td>
                
                <td widthf="100px">رقم العقد / الحجز</td>
                <td widthf="110px">منِ</td>
                <td widthf="100px">المبلغ</td>
                <td widthf="100px">من أجل </td>
                <td widthf="100px">طريقة الدفع</td>
                <td widthf="100px">التاريخ</td>
                <td widthf="100px">العمليات</td>
            </tr>
			
                <tr class="page1">
				<?php
			if(!empty($recipts)) { 
      foreach($recipts as $recipt){
			
			?>
                    <input class="client-id" type="hidden" value=""/>
                    <td ><?php echo $recipt['recipet_id']; ?></td>
                   
                    <td ><?php echo $recipt['contract_id']; ?></td>
                    <td ><?php echo $recipt['payee']; ?></td>
                    <td ><?php echo $recipt['amount']; ?></td>
                    <td ><?php echo $recipt['reason']; ?> </td>
                    <td ><?php echo $recipt['paymen_method']; ?></td>
                    <td ><?php echo $recipt['Hijri_date']; ?></td>
                    <td>
                      <a href="#view_client<?php echo $recipt['recipet_id']; ?>" class="view_furnitures_pop"><img src="images/view.png" class="" align="" alt="View"/></a>
                      <div id="view_client<?php echo $recipt['recipet_id']; ?>" class="view_client zoom-anim-dialog mfp-hide view-booking-popup ltr">
                        <?php require("recipt_vouchers/view.php"); ?>       
                      </div>
                      <?php if($recipt['contract_status'] != 3){ ?>
                      <a href="#edit_client<?php echo $recipt['recipet_id']; ?>" class="edit_furnitures_pop"><img src="images/edit.png" class="margin-right5" align="" alt="Edit"/></a>
                      <div id="edit_client<?php echo $recipt['recipet_id']; ?>" class="edit_client zoom-anim-dialog mfp-hide view-booking-popup">
                        <?php require("recipt_vouchers/edit.php"); ?>       
                      </div>
                      
                      <a href="#" class="delete"><img src="images/x.png" class="margin-right5" align="" alt="Delete"/></a>
					   <input class="delete-id" type="hidden" value="<?php echo $recipt['recipet_id']; ?>"/>
                      <input class="filter-id" type="hidden" value="9"/> <!-- 9 means delete recipt vouchers -->
					  <?php } ?>
                    <!--  <a href="#link_client" class="link_vouchers_pop"><img src="images/link.png" class="margin-right5" align="" alt="Link"/></a>
                      <div id="link_client" class="link_client zoom-anim-dialog mfp-hide view-booking-popup">
                        <?php// require("recipt_vouchers/link.php"); ?>       
                      </div> -->
                      
				
                </tr>
				<?php }
          }
          else {
            echo "<td colspan='8' class='large red' align=''>لا توجد نتائج</td>";
          }
          ?>
                </table>
				<?php 
				$start = $page * 20 -19;
          $end  = $start + 19;
          if($end > $totalPages)
            $end = $totalPages;
        if(!empty($recipts)) { 
				?>
        <div class="clear"></div>
        <div class="relative">
          <span class="middle xsmall showing-results absolute">عرض النتائج <?php echo $start; ?> - <?php echo $end; ?> من إجمالى <?php echo $totalPages; ?></span>
          <div id="recipt-selection" class="center"></div>
        </div>
        <div class="hidden totalPages"><?php if(isset($totalPages)) {echo $totalPages;} ?></div>
        <div class="hidden currentPage"><?php if(isset($page)) {echo $page;} ?></div>
        <?php } ?>
				
    </div> 
         <div class="clear"></div>                    
</div>
<br />